﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AdaptiveAgents
{
    /// <summary>
    /// An observation of an agent on another agent action
    /// </summary>
    public class Observation
    {
        //data members
        private int time;
        private int agentID;
        private double value;
        private int nextAgent;

        /// <summary>
        /// Constructor
        /// </summary>
        public Observation()
            : this(0, 0, 0, -1) {}

        /// <summary>
        /// Constructor with parameters
        /// </summary>
        /// <param name="time">game round</param>
        /// <param name="agentID">other agent id</param>
        /// <param name="value">the value of the other agent action</param>
        /// <param name="nextAgent">the next agent</param>
        public Observation(int time, int agentID, double value, int nextAgent)
        {
            this.time = time;
            this.agentID = agentID;
            this.value = value;
            this.nextAgent = nextAgent;
        }

        /// <summary>
        /// Constructor with parameters
        /// </summary>
        /// <param name="time">game round</param>
        /// <param name="agentID">other agent id</param>
        /// <param name="value">the value of the other agent action</param>
        public Observation(int time, int agentID, double value)
            : this(time, agentID, value, -1)
        { }

        /// <summary>
        /// Getter for the agent that acted on this observation
        /// </summary>
        public int ID
        {
            get { return agentID; }
        }

        /// <summary>
        /// Getter for the value that the agent's action got on this observation
        /// </summary>
        public double Value
        {
            get { return value; }
        }

        /// <summary>
        /// Getter for the game round on this observation
        /// </summary>
        public int Time
        {
            get { return time; }
        }

        /// <summary>
        /// Getter and Setter for the ID of the next operating agent (according to the active agent choice)
        /// </summary>
        public int NextAgent
        {
            get { return nextAgent; }
            set { nextAgent = value; }
        }
    }

}
